package com.bst.md.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bst.md.mapper.MdIndexSuffixMapper;
import com.bst.md.domain.MdIndexSuffix;
import com.bst.md.service.IMdIndexSuffixService;
import com.bst.common.core.text.Convert;

/**
 * 指标后缀Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-19
 */
@Service("suffixService")
public class MdIndexSuffixServiceImpl implements IMdIndexSuffixService 
{
    @Autowired
    private MdIndexSuffixMapper mdIndexSuffixMapper;

    /**
     * 查询指标后缀
     * 
     * @param idSuffix 指标后缀主键
     * @return 指标后缀
     */
    @Override
    public MdIndexSuffix selectMdIndexSuffixByIdSuffix(Long idSuffix)
    {
        return mdIndexSuffixMapper.selectMdIndexSuffixByIdSuffix(idSuffix);
    }

    @Override
    public List<MdIndexSuffix> selectAll() {
        return mdIndexSuffixMapper.selectMdIndexSuffixList(new MdIndexSuffix());
    }

    /**
     * 查询指标后缀列表
     * 
     * @param mdIndexSuffix 指标后缀
     * @return 指标后缀
     */
    @Override
    public List<MdIndexSuffix> selectMdIndexSuffixList(MdIndexSuffix mdIndexSuffix)
    {
        return mdIndexSuffixMapper.selectMdIndexSuffixList(mdIndexSuffix);
    }

    /**
     * 新增指标后缀
     * 
     * @param mdIndexSuffix 指标后缀
     * @return 结果
     */
    @Override
    public int insertMdIndexSuffix(MdIndexSuffix mdIndexSuffix)
    {
        return mdIndexSuffixMapper.insertMdIndexSuffix(mdIndexSuffix);
    }

    /**
     * 修改指标后缀
     * 
     * @param mdIndexSuffix 指标后缀
     * @return 结果
     */
    @Override
    public int updateMdIndexSuffix(MdIndexSuffix mdIndexSuffix)
    {
        return mdIndexSuffixMapper.updateMdIndexSuffix(mdIndexSuffix);
    }

    /**
     * 批量删除指标后缀
     * 
     * @param idSuffixs 需要删除的指标后缀主键
     * @return 结果
     */
    @Override
    public int deleteMdIndexSuffixByIdSuffixs(String idSuffixs)
    {
        return mdIndexSuffixMapper.deleteMdIndexSuffixByIdSuffixs(Convert.toStrArray(idSuffixs));
    }

    /**
     * 删除指标后缀信息
     * 
     * @param idSuffix 指标后缀主键
     * @return 结果
     */
    @Override
    public int deleteMdIndexSuffixByIdSuffix(Long idSuffix)
    {
        return mdIndexSuffixMapper.deleteMdIndexSuffixByIdSuffix(idSuffix);
    }
}
